<div data-am-widget="tabs" class="am-tabs am-tabs-default">
    <ul class="am-tabs-nav am-cf">
        <li class="am-active"><a href="#">两面</a></li>
        <li class=""><a href="#">单号</a></li>
        <li class=""><a href="#">连码</a></li>
        <li class=""><a href="#">直选</a></li>
    </ul>
    <div class="am-tabs-bd">
        <div data-tab-panel-0 class="am-tab-panel am-active">
            <table class="zonghe container">
                <thead>
                    <tr>
                        <th colspan="3">总和</th>
                    </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
            <ul class="am-avg-sm-5 five">
            </ul>
        </div>
        <div data-tab-panel-1 class="am-tab-panel ">
            <table class="zhong1 container">
                <tbody>
                </tbody>
            </table>
            <ul class="am-avg-sm-5 five2">
            </ul>
        </div>
        <div data-tab-panel-2 class="am-tab-panel ">
            <table class="lianma container">
                <tbody>
                </tbody>
            </table>
        </div>
        <div data-tab-panel-3 class="am-tab-panel ">
            <table class="zhixuan container">
                <tbody>
                </tbody>
            </table>
        </div>
    </div>

    <button class="save am-btn-xl am-btn-danger ">保存</button>
</div>

<script>
    var types = ["大", "单", "尾大", "龙", '小', '双', '尾小', '虎'];
    var table = $(".zonghe");
    table.empty();
    var tr = $("<tr></tr>");
    for (var i = 0; i < types.length; i++) {
        var key = types[i];
        var name = types[i];
        if (key == '大' || key == '小' || key == '单' || key == '双') {
            key = '和' + key;
            name = '总和' + name;
        }
        if (key == '尾大' || key == '尾小') name = '总和' + name;

        AdminLimit.add(key, name, tr);
        if (i == 3) {
            table.append(tr);
            tr = $("<tr></tr>");
        }
    }
    table.append(tr);

    var ths = ["第一球", "第二球", "第三球", "第四球", "第五球"];
    var arr = ['一', '二', '三', '四', '五'];
    var types = ["大", "小", "单", "双"];
    
    // 1~5球的大小单双
    var div = $(".five");
    div.empty();
    for (var i in arr) {
        var table = $('<table class="container"></table>');
        table.append('<tr><th>第' + arr[i] + '球</th></tr>');
        for (var j in types) {
            var tr = $("<tr></tr>");
            AdminLimit.add(arr[i] + types[j], types[j], tr);
            table.append(tr);
        }

        var li = $("<li></li>");
        li.append(table);
        div.append(li);
    }

    // 一中一
    var table = $(".zhong1 tbody");
    table.empty();
    var tr = $("<tr></tr>");
    AdminLimit.add("任1", "一中一", tr);
    table.append(tr);

    // 1~5球的数字
    var div = $(".five2");
    div.empty();
    for (var i in arr) {
        var table = $('<table class="container"></table>');
        table.append('<tr><th>第' + arr[i] + '球</th></tr>');
        for (var j = 1; j <= 11; j++) {
            var tr = $("<tr></tr>");
            var k = j < 10 ? "0" + j : j;
            AdminLimit.add(arr[i] + k, k, tr);
            table.append(tr);
        }

        var li = $("<li></li>");
        li.append(table);
        div.append(li);
    }

    var types = ['任2', '任3', '任4', '任5', '任6', '任7', '任8', '组2', '组3'];
    var table = $(".lianma tbody");
    table.empty();
    var tr = $("<tr></tr>");
    for (var i in types) {
        AdminLimit.add(types[i], Gd115Rule.getTargetName(types[i]), tr);
        if (i % 3 == 2) {
            table.append(tr);
            tr = $("<tr></tr>");
        }
    }

    var types = ['直2', '直3'];
    var table = $(".zhixuan tbody");
    table.empty();
    var tr = $("<tr></tr>");
    for (var i in types) {
        AdminLimit.add(types[i], Gd115Rule.getTargetName(types[i]), tr);
    }
    table.append(tr);
</script>

<style type="text/css">
    .zonghe .lottery-item .rate {
        width: 140px;
    }
    .zhong1 .lottery-item .rate {
        width: 200px;
    }
    .lianma .rate, .zhixuan .rate {
        width: 140px;
    }
</style>
